package openjdk.jdk8.stream;

import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

public class SetDemo {

    static List<Long> lst01 = Arrays.asList(1L, 2L, 3L);
    static List<Long> lst02 = Arrays.asList(1L, 2L);

    public static void main(String[] args) {
        Set st = lst01.stream().map(o -> o.intValue()).collect(Collectors.toSet());
        Set st2 = lst02.stream().map(o -> o.intValue()).collect(Collectors.toSet());

        st.removeAll(st2);

        st.forEach(o-> System.out.println(o));

    }
}
